package com.hioove.test.config;

import com.hioove.core.aop.annotation.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Aspect
public class AopLogConfig {
    static Logger log = LoggerFactory.getLogger(AopLogConfig.class);

    @Pointcut
    public void pointcut() {
        log.info("i am aop-log-config pointcut!!!");
        long l = System.currentTimeMillis();
    }

    @Before("pointcut()")
    public void before() {
        log.info("i am aop-log-config before!!!");
        long l = System.currentTimeMillis();
    }

    @After("pointcut()")
    public void after() {
        log.info("i am aop-log-config after!!!");
        long l = System.currentTimeMillis();
    }

    @AfterReturning("pointcut()")
    public void afterReturning() {
        log.info("i am aop-log-config afterReturning!!!");
        long l = System.currentTimeMillis();
    }

    @AfterThrowing("pointcut()")
    public void afterThrowing() {
        log.info("i am aop-log-config afterThrowing!!!");
        long l = System.currentTimeMillis();
    }

    @Around("pointcut()")
    public void around() {
        log.info("i am aop-log-config around!!!");
        long l = System.currentTimeMillis();
    }
}
